# Replication Package: Zhukov, "Repressed Memories"

---------------------------------------------------------------------

Updated 07/28/2025.

# Table of Contents
1. [Overview](#overview)
2. [Data Sources](#data)
3. [System Requirements](#system)
4. [Instructions](#instructions)
5. [Mapping of Code to Figures and Tables](#instructions)
6. [Codebook](#codebook)


# Overview <a name="overview"></a>

The code in this replication package reconstructs the empirical analyses in Zhukov, "Repressed Memories". One R script will run all of the code to generate the figures and tables in the main body of the paper and all empirical results in the Online Appendix (`master.R`). The replicator should expect the code to run for about 1 hour, depending on system configuration.

Please note that there are several non-empirical figures and tables in the paper and appendix, which this replication package does not reproduce directly:

- *Figures 1, A0.1, A0.2*: Theoretical graphics, generated in LaTeX with tikz.
- *Figure A1.3, A4.16*: Scanned images of maps.
- *Figure A1.4*: Illustrative screenshots.
- *Table A4.10*: Qualitative comparison of data sources.

## Statement About Rights

- [x] We certify that the authors of the manuscript have legitimate access to and permission to use the data used in this manuscript.
- [x] We certify that the authors of the manuscript have documented permission to redistribute/publish the data contained within this replication package. Appropriate permissions are documented in the `LICENSE.txt` file.

These data are licensed under a CC-BY-NC-SA license (Creative Commons-Attribution-NonCommercial-ShareAlike). See `LICENSE.txt` for details.

## Contents of Replication Package

- `README.md`: this file
- `code/`: directory with R scripts sourced by `master.R`
    - `master.R`: R script that executes all R replication code in sequence
    - `run1_setup.R`: R script to install missing packages and dependencies
    - `run2_main.R`: R script to replicate all figures and tables in main text and online appendices
    - `functions.R`: R script with custom functions sourced by `run2_main.R` 
    - `blocks/moscow1938_blocks.geojson`: historical city block geometries and attributes for Moscow
    - `blocks/moscow1938_districts.geojson`: historical city district boundary geometries for Moscow
    - `blocks/leningrad1935_blocks.geojson`: historical city block geometries and attributes for Leningrad
    - `blocks/leningrad1936_districts.geojson`: historical city district boundary geometries for Leningrad
    - `individuals/moscow_individuals.RDS`: individual-level arrest and memorial data for Moscow
    - `individuals/leningrad_individuals.RDS`: individual-level arrest and memorial data for Leningrad
    - `individuals/memo_rehab.RDS`: expanded individual-level data used in supplemental analyses
- `results/`: directory with files generated by `run2_main.R` (you may need to create this directory)
    - `fig*.png`: figures in PNG format 
    - `tab*.tex`: tables in LaTeX format 


# Data Sources <a name="data"></a>

## 1. City blocks and districts

Source data on the geometries of historical **city blocks and district boundaries** are scanned maps from government agencies (Krasil’nikov (1938) for Moscow, and Russ (1935) for Leningrad). 

Citation info:
- Krasil’nikov, K.P., ed. *Plan Moskvy i okrestnostey [Plan of Moscow and Surroundings]*, 1938. 2nd Cartographic Factory, Main Directorate for Geodesic Surveying and Cartography NKVD USSR.
- Russ, A.G., ed. *Plan Leningrada [Plan of Leningrad]*, 1935. Leningrad Oblast Executive Committee and Leningrad Soviet.

Source data on historical **district-level population counts** from the 1939 Soviet census.

Citation info:
- Central Statistical Directorate of USSR. *Vsesoyuznaya perepis' naseleniya 1939 goda [All-union population census]*, 1939. Moscow: Central Statistical Directorate of USSR.

Source data on the **locations of RO NKVD branches** and other organs of state security are from Memorial's "Topography of Terror" project. The original data can be downloaded from https://topos.memo.ru/. 

Citation info: 
- Memorial. *Topografiya Terrora [Topography of Terror]*, 2016. url: https://topos.memo.ru/.

Source data on the locations of **contemporary law enforcement agencies and state security** services are from Moody's Orbis database. The raw data can be accessed through https://orbis.bvdinfo.com/.

Citation info:
- Moody’s Analytics. *Orbis: Global Company Data*, 1935. url: https://orbis.bvdinfo.com/.

Data objects provided as part of this archive:
- `blocks/moscow1938_blocks.geojson`
- `blocks/moscow1938_districts.geojson`
- `blocks/leningrad1935_blocks.geojson`
- `blocks/leningrad1936_districts.geojson`


## 2. Individual victims of state terror

Data on **individual arrests and executions** are from the Victims of State Terror in Moscow database and Victims of Political Terror archive, both maintained by the Russian human rights organization Memorial. The raw data can be downloaded from https://mos.memo.ru and https://lists.memo.ru/. 

Citation info:
- Memorial. *Zhertvy politicheskogo terrora v SSSR [Victims of political terror in the USSR]*, 2014. url: http://lists.memo.ru/.
- Memorial. *Zhertvy gosudarstvennogo terrora v Moskve [Victims of state terror in Moscow]*, 2004. url: http://mos.memo.ru/.

Data on **petitions and memorial plaques** are from the website of the Last Address project. The raw data can be downloaded from https://www.poslednyadres.ru/. 

Citation info:
- Last Address. *Zhertvy politicheskogo terrora v SSSR [Victims of political terror in the USSR]*, 2014. url: http://lists.memo.ru/.
- Memorial. *Zhertvy gosudarstvennogo terrora v Moskve [Victims of state terror in Moscow]*, 2004. url: http://mos.memo.ru/.

Data on **NKVD officers' service histories** are from the "Cadres of State
Security Organs of USSR" archive, maintained by Memorial. The original data can be downloaded from https://nkvd.memo.ru/. 

Citation info:
- Memorial. *Kadrovyy sostav organov gosudarstvennoy bezopasnosti SSSR. 1935-1939. [Cadres of state security organs of USSR, 1935-1939]*, 2017. url: https://nkvd.memo.ru/.

Data objects provided as part of this archive:
- `individuals/moscow_individuals.RDS`
- `individuals/leningrad_individuals.RDS`
- `individuals/memo_rehab.RDS`
- `blocks/moscow1938_blocks.geojson`
- `blocks/moscow1938_districts.geojson`
- `blocks/leningrad1935_blocks.geojson`
- `blocks/leningrad1936_districts.geojson`


# System Requirements <a name="system"></a>

## 1. Software Requirements

Portions of the code rely on forking to run in parallel on multicore systems, which requires Linux or Mac OS. Single-core processing is possible on Windows if `mc.cores = 1` in `parallel::mclapply`.

R version 4.5.1 (2025-06-13)
- Platform: `x86_64-pc-linux-gnu` (64-bit)
- Running under: Ubuntu 22.04.5 LTS
- The script `run1_setup.R` will install all missing packages and dependencies, and should be run prior to executing `run2_main.R`
- Attached packages:
        - `BMA` (3.18.20)
        - `data.table` (1.17.0)  
        - `dplyr` (1.1.4)
        - `fixest` (0.12.1)
        - `Formula` (1.2-5)
        - `lfe` (3.1.1)
        - `mvtnorm` (1.3-3)
        - `parallel`
        - `rdrobust` (2.2)
        - `sf` (1.0-20)
        - `splines` (4.5.1)
        - `spmodel` (0.10.0)
        - `stringr` (1.5.1)
        - `SUNGEO` (1.3.0)
        - `xtable` (1.8-4)
 

## 2. Hardware Requirements

Approximate time needed to reproduce the analyses on a standard (2025) desktop machine is 1 hour.

The code was last run on a 16-core (Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz) laptop with 64 GB of RAM, running Ubuntu 22.04.5 LTS. Computation took about 20 minutes. 


# Instructions to Replicators <a name="instructions"></a>

Extract the contents of the archive to a directory of your choice. Edit the preamble to `master.R` as needed to adjust the default working directory in `setwd()` to the unzipped folder's location on your system. The path should point to the directory that contains the folders `code/` and `data/`. To execute the code line by line, run the scripts in the following order (after setting the working directory in R):
    - Run `code/run1_setup.R` to set up the working environment. 
    - Run `code/run2_main.R` to replicate all figures and tables in the main text and appendix.
    
# Mapping of code to tables and figures <a name="mapping"></a>

| Figure/Table | Program | Lines | Comment |
| :--- | :--- | :--- | :--- |
| Figure 1 | N/A | N/A | theoretical graphic |
| Figure 2 | `run2_main.R` | 21-85 | |
| Figure 3 | `run2_main.R` | 86-131 | |
| Figure 4 | `run2_main.R` | 184-289 | |
| Figure 5 | `run2_main.R` | 290-396 | |
| Figure 6 | `run2_main.R` | 397-529 | |
| Figure 7 | `run2_main.R` | 530-662 | |
| Figure 8 | `run2_main.R` | 663-796 | |
| Figure 9 | `run2_main.R` | 797-929 | |
| Table 1 | `run2_main.R` | 132-183 | |
| Table 2 | `run2_main.R` | 930-978 | |
| Figure A0.1 | N/A | N/A | theoretical graphic |
| Figure A0.2 | N/A | N/A | theoretical graphic |
| Figure A1.3 | N/A | N/A | scanned image |
| Figure A1.4 | N/A | N/A | screenshots |
| Figure A2.5 | `run2_main.R` | 1047-1183 | |
| Figure A2.6 | `run2_main.R` | 1047-1183 | |
| Figure A2.7 | `run2_main.R` | 1047-1183 | |
| Figure A3.8 | `run2_main.R` | 397-529 | |
| Figure A3.9 | `run2_main.R` | 530-662 | |
| Figure A3.10 | `run2_main.R` | 530-662 | |
| Figure A3.11 | `run2_main.R` | 530-662 | |
| Figure A3.12 | `run2_main.R` | 663-796 | |
| Figure A3.13 | `run2_main.R` | 797-929 | |
| Figure A3.14 | `run2_main.R` | 1364-1506 | |
| Figure A3.15 | `run2_main.R` | 1364-1506 | |
| Figure A4.16 | N/A | N/A | scanned image |
| Figure A4.17 | `run2_main.R` | 1507-2104 | |
| Figure A4.18 | `run2_main.R` | 1507-2104 | |
| Figure A4.19 | `run2_main.R` | 1507-2104 | |
| Figure A4.20 | `run2_main.R` | 1507-2104 | |
| Figure A4.21 | `run2_main.R` | 1507-2104 | |
| Table A2.1 | `run2_main.R` | 979-1046 | |
| Table A2.2 | `run2_main.R` | 1047-1183 | |
| Table A2.3 | `run2_main.R` | 132-183 | |
| Table A2.4 | `run2_main.R` | 979-1046 | |
| Table A2.5 | `run2_main.R` | 1047-1183 | |
| Table A3.6 | `run2_main.R` | 1184-1239 | |
| Table A3.7 | `run2_main.R` | 1240-1285 | |
| Table A3.8 | `run2_main.R` | 1286-1363 | |
| Table A3.9 | `run2_main.R` | 1286-1363 | |
| Table A4.10 | N/A | N/A | summary table comparing data sources for Moscow and Leningrad |
| Table A4.11 | `run2_main.R` | 1507-2104 | |


# Codebook <a name="codebook"></a>

### Variable definitions for `blocks/moscow1938_blocks.geojson`

|name                     |definition                                          |
|:------------------------|:---------------------------------------------------|
|BLOK_ID                  |City block                                          |
|RAY_ID                   |District ID                                         |
|RAY_NAME                 |District name                                       |
|AREA_RAYR                |District area (residential)                         |
|AREA_RESI                |Block area (residential)                            |
|LAT                      |Latitude                                            |
|LAT_CENT                 |Latitude (centroid)                                 |
|LONG                     |Longitude                                           |
|LONG_CENT                |Longitude (centroid)                                |
|ARR_PCTR                 |Neighbors arrested (percent of block)               |
|EVT_PCTR                 |Neighbors executed (percent of block)               |
|N_ARREST_R               |Neighbors arrested                                  |
|N_DENREMREQ_R            |Number of denials and removals                      |
|N_EVENT_R                |Neighbors executed                                  |
|N_TOTAL_R                |Petitions                                           |
|PLA_PCTR                 |Plaques (\%)                                        |
|DENREMREQ_PCTR           |Denied/Removed (\%)                                 |
|DIST2AGRI                |Distance to agriculture                             |
|DIST2CAMP                |Distance to camp                                    |
|DIST2CARC                |Distance to carceral facility                       |
|DIST2CEME                |Distance to cemetery                                |
|DIST2COUR                |Distance to court                                   |
|DIST2EDUC                |Distance to educational facility                    |
|DIST2ENTE                |Distance to entertainment venue                     |
|DIST2GOVE                |Distance to government facility                     |
|DIST2HOSP                |Distance to hospital                                |
|DIST2HOTE                |Distance to hotel                                   |
|DIST2INDU                |Distance to industrial site                         |
|DIST2MILI                |Distance to military base                           |
|DIST2MTRO                |Distance to metro                                   |
|DIST2MUSE                |Distance to museum                                  |
|DIST2NKVD                |Distance to NKVD                                    |
|DIST2PART                |Distance to party organ                             |
|DIST2PROS                |Distance to prosecutor                              |
|DIST2RAIL                |Distance to railroad                                |
|DIST2RESI                |Distance to residential                             |
|DIST2SHAR                |Distance to sharashki                               |
|DIST2STN                 |Distance to rail station                            |
|DIST2TRAN                |Distance to transporation                           |
|KREMLIN_DIST             |Distance to Kremlin                                 |
|N_PLAQO_Arts_Sov_R       |Soviet-era plaques: Arts                            |
|N_PLAQO_Government_Sov_R |Soviet-era plaques: Government                      |
|N_PLAQO_Medicine_Sov_R   |Soviet-era plaques: Medicine                        |
|N_PLAQO_Military_Sov_R   |Soviet-era plaques: Military                        |
|N_PLAQO_Party_Sov_R      |Soviet-era plaques: Party                           |
|N_PLAQO_Science_Sov_R    |Soviet-era plaques: Science                         |
|N_PLAQO_Sports_Sov_R     |Soviet-era plaques: Sports                          |
|POP_WA                   |Block population                                    |
|POP_WR                   |Block population (residential)                      |
|RAYPOP39                 |District population (1939)                          |
|TROIKA_DIST              |Distance to Troika                                  |
|BLOK_ZONE                |Zoning                                              |
|ZONE_AGRI                |Block zoning: agriculture                           |
|ZONE_CAMP                |Block zoning: camp                                  |
|ZONE_CARC                |Block zoning: carceral                              |
|ZONE_CEME                |Block zoning: cemetery                              |
|ZONE_COUR                |Block zoning: courts                                |
|ZONE_EDUC                |Block zoning: education                             |
|ZONE_ENTE                |Block zoning: entertainment                         |
|ZONE_GOVE                |Block zoning: government                            |
|ZONE_HOSP                |Block zoning: hospital                              |
|ZONE_HOTE                |Block zoning: hotel                                 |
|ZONE_INDU                |Block zoning: industrial                            |
|ZONE_MILI                |Block zoning: military                              |
|ZONE_MUSE                |Block zoning: museum                                |
|ZONE_NKVD                |Block zoning: NKVD                                  |
|ZONE_PART                |Block zoning: party organs                          |
|ZONE_PROS                |Block zoning: prosecutor                            |
|ZONE_RESI                |Block zoning: residential                           |
|ZONE_SHAR                |Block zoning: sharashka                             |
|ZONE_TRAN                |Block zoning: transportation                        |
|distance_RAY_NAME        |Distance to nearest district                        |
|nearest_RAY_NAME         |Nearest district name                               |
|corp_size_p1             |Average size of local enterprises' corporate groups |
|pbl_pos_p3               |Local security services (expanded)                  |
|pbl_sec_p3               |Local security services                             |
|sector_1_p1              |Primary sector enterprises                          |
|sector_2_p1              |Secondary sector enterprises                        |
|sector_3_p1              |Tertiary sector enterprises                         |
|sector_4_p1              |Quarternary sector enterprises                      |
|sector_5_p1              |State enterprises                                   |
|wr                       |Block population weights                            |
|geometry                 |WKT geometry column                                 |

### Variable definitions for `individuals/moscow_individuals.RDS`

|name              |definition                       |
|:-----------------|:--------------------------------|
|arrest_id         |Arrest ID                        |
|RESI_ID           |Block ID                         |
|RAY_NAME          |District ID                      |
|LA_ANY            |Petition                         |
|LA_ANY_2          |Petition                         |
|LA_DATE           |Date of petition                 |
|LA_DENREMREQ_2    |Denied/Removed                   |
|LA_REMOVED_2      |Plaque removed                   |
|N_ARREST          |Number of arrests                |
|N_ARREST_R        |Neighbors executed               |
|N_ARREST_WORK     |Coworkers executed               |
|N_EVENT_R         |Neighbors executed               |
|name_clean        |Victim's name                    |
|info              |Victim biography                 |
|male              |Victim's sex                     |
|manager           |Professional managerial class    |
|nationality_short |Ethnicity                        |
|eth_nonrus        |Non-Russian                      |
|born_foreign      |Foreign-born                     |
|dob_year          |Year of birth                    |
|educ_higher       |Higher education                 |
|nkvd_strict       |NKVD service                     |
|okonkh            |Industry                         |
|p_clergy          |Clergy member                    |
|p_military        |Military servicemember           |
|party             |Party membership                 |
|party_mcy         |Party member, candidate or youth |
|party_mem         |Party member                     |
|party_tsk         |Party nomenklatura               |
|ZONE_AGRI         |Block zoning: agriculture        |
|ZONE_CAMP         |Block zoning: camp               |
|ZONE_CARC         |Block zoning: carceral           |
|ZONE_CEME         |Block zoning: cemetery           |
|ZONE_COUR         |Block zoning: courts             |
|ZONE_EDUC         |Block zoning: education          |
|ZONE_ENTE         |Block zoning: entertainment      |
|ZONE_GOVE         |Block zoning: government         |
|ZONE_HOSP         |Block zoning: hospital           |
|ZONE_HOTE         |Block zoning: hotel              |
|ZONE_INDU         |Block zoning: industrial         |
|ZONE_MILI         |Block zoning: military           |
|ZONE_MUSE         |Block zoning: museum             |
|ZONE_NKVD         |Block zoning: NKVD               |
|ZONE_PART         |Block zoning: party organs       |
|ZONE_PROS         |Block zoning: prosecutor         |
|ZONE_RESI         |Block zoning: residential        |
|ZONE_SHAR         |Block zoning: sharashka          |
|ZONE_TRAN         |Block zoning: transportation     |
|geometry          |WKT geometry column              |

### Variable definitions for `blocks/leningrad1935_blocks.geojson`

|name                  |definition                            |
|:---------------------|:-------------------------------------|
|BLOK_ID               |City block                            |
|RAY1935_ID            |District ID (1935)                    |
|RAY1935_NAME          |District name (1935)                  |
|RAY1936_ID            |District ID (1936)                    |
|RAY1936_NAME          |District name (1936)                  |
|LAT                   |Latitude                              |
|LAT_CENT              |Latitude (centroid)                   |
|LONG                  |Longitude                             |
|LONG_CENT             |Longitude (centroid)                  |
|N_EVENT_R             |Neighbors executed                    |
|EVT_PCTR              |Neighbors executed (percent of block) |
|N_TOTAL_R             |Petitions                             |
|DENREMREQ_PCTR        |Denied/Removed (\%)                   |
|POP_WA                |Block population                      |
|POP_WR                |Block population (residential)        |
|RAYPOP39              |District population (1939)            |
|BLOK_ZONE             |Zoning                                |
|ZONE_AGRI             |Block zoning: agriculture             |
|ZONE_EDUC             |Block zoning: education               |
|ZONE_ENTE             |Block zoning: entertainment           |
|ZONE_GOVE             |Block zoning: government              |
|ZONE_HOSP             |Block zoning: hospital                |
|ZONE_HOTE             |Block zoning: hotel                   |
|ZONE_INDU             |Block zoning: industrial              |
|ZONE_RESI             |Block zoning: residential             |
|ZONE_RETA             |Block zoning: retail                  |
|ZONE_TRAN             |Block zoning: transportation          |
|distance_RAY1936_NAME |Distance to nearest district          |
|nearest_RAY1936_NAME  |Nearest district name                 |
|pbl_sec_p3            |Local security services               |
|wr                    |Block population weights              |
|geometry              |WKT geometry column                   |

### Variable definitions for `individuals/leningrad_individuals.RDS`

|name              |definition                    |
|:-----------------|:-----------------------------|
|arrest_id         |Arrest ID                     |
|RESI_ID           |Block ID                      |
|RAY1935           |District name (1935)          |
|RAY1935_ID        |District ID (1935)            |
|RAY1936           |District name (1935)          |
|RAY1936_ID        |District ID (1935)            |
|NAME              |Victim's name                 |
|osm_lat           |Address latitude              |
|osm_long          |Address longitude             |
|male              |Victim's sex                  |
|manager           |Professional managerial class |
|nationality_short |Ethnicity                     |
|educ_higher       |Higher education              |
|eth_nonrus        |Non-Russian                   |
|okonkh            |Industry                      |
|p_clergy          |Clergy member                 |
|p_military        |Military servicemember        |
|party             |Party membership              |
|N_EVENT_R         |Neighbors executed            |
|LA_ANY            |Petition                      |
|LA_DENREMREQ      |Denied/Removed                |
|ZONE_AGRI         |Block zoning: agriculture     |
|ZONE_EDUC         |Block zoning: education       |
|ZONE_ENTE         |Block zoning: entertainment   |
|ZONE_GOVE         |Block zoning: government      |
|ZONE_HOSP         |Block zoning: hospital        |
|ZONE_HOTE         |Block zoning: hotel           |
|ZONE_INDU         |Block zoning: industrial      |
|ZONE_RESI         |Block zoning: residential     |
|ZONE_RETA         |Block zoning: retail          |
|ZONE_TRAN         |Block zoning: transportation  |
|geometry          |WKT geometry column           |

### Variable definitions for `individuals/memo_rehab.RDS`

|name              |definition                      |
|:-----------------|:-------------------------------|
|NAME              |Victim's name                   |
|dob_year          |Year of birth                   |
|SSR               |Republic of birth               |
|manager           |Professional managerial class   |
|education         |Education                       |
|nationality_short |Ethnicity                       |
|okonkh            |Industry                        |
|p_clergy          |Clergy member                   |
|p_military        |Military servicemember          |
|REHABILITATED     |Rehabilitation status           |
|rehab             |Victim rehabilitation indicator |
|rehab_year        |year of rehabilitation          |

